* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

h1 {
    color: #2c3e50;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

input[type="range"] {
    width: 100px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-left: auto;
    align-self: flex-end;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

#start-btn {
    background-color: #27ae60;
    color: white;
}

#stop-btn {
    background-color: #e74c3c;
    color: white;
}

#reset-btn {
    background-color: #3498db;
    color: white;
}

button:hover {
    opacity: 0.9;
}

.simulation-area {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.info-panel {
    width: 250px;
    padding: 15px;
    background: #f0f4f8;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-right: 20px;
}

canvas {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
    min-height: 400px;
}

.info-panel h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#status-message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
}

#status-message.error {
    background-color: #ffebee;
    color: #c62828;
}

#status-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

#current-angle, #mechanism-type {
    margin-bottom: 5px;
    font-weight: 500;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-controls button {
    padding: 4px 8px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 14px;
}

#zoom-level {
    display: inline-block;
    min-width: 50px;
    text-align: center;
    font-weight: 600;
}

#auto-scale-btn {
    background-color: #9b59b6;
}
